//
//  AppDelegate.m
//  1yqb
//
//  Created by 曲天白 on 15/12/11.
//  Copyright © 2015年 乙科网络. All rights reserved.
//

#import <Foundation/Foundation.h>


#define SERVER_IMAGE @""//图片加载头地址
#define SUCCEED_CODE @"0"  //网络返回成功码
typedef void (^netRequestResultBlock)(id data);
@interface NetWorkTool : NSObject

/**
 *  数组转json
 *
 *  @param arr 数组
 *
 *  @return 数组json
 */
+ (NSString *)NSArrayTojson:(NSArray *)arr;
/**
 *  json 转 字典
 *
 *  @param jsonStr json
 *
 *  @return 数组
 */
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonStr;
/**
 * 字典转json
 */
+ (NSString*)dictionaryToJson:(NSDictionary *)dic;
/**
 *  json 转 数组
 *
 *  @param jsonStr json
 *
 *  @return 数组
 */
+(NSArray *)arrayWithjsonString:(NSString *)jsonStr;
/**
 *  便利加载网络图片
 *
 *  @param imagV       图片容器
 *  @param imageUrlStr 图片地址字符串
 */
+(void)imageWithImagView:(UIImageView *)imagV andImageUrlStr :(NSString *)imageUrlStr;

+(void)asyncNetworkingUrl:(NSString *)url andDict:(NSDictionary *)param
                  success:(void (^)(NSDictionary *responseObject))success
                  failure:(void (^)(NSError *error))failure;

#pragma -mark 上传图片
+ (void)userHeadImg:(NSMutableArray *)imgArr deleteArr:(NSMutableArray *)deleteArr billId:(NSString*)billId billType:(NSString *)billType success:(void (^)(NSDictionary *responseObject))success failure:(void (^)(NSError *error))failure   uploadProgressBlock:(void(^)(float uploadPercent,long long totalBytesWritten,long long totalBytesExpectedToWrite))uploadProgressBlock;
#pragma -mark 团购活动列表
+(void)getTuanGouActivityDataWithPage:(NSInteger)page isSignUp:(BOOL)isSignUp finishBlock:(netRequestResultBlock)finishBlock;
#pragma -mark 检查新版本
+(void)getNewVerson:(netRequestResultBlock)finishBlock;
#pragma -mark 登录
+(void)goToLoginWithLoginId:(NSString*)loginId userPwd:(NSString*)userPwd block:(netRequestResultBlock)finishBlock;
#pragma -mark 首页
+(void)getHomeData:(netRequestResultBlock)finishBlock;
#pragma -mark 病害巡查列表
+(void)getSearchForDiseaseWithPage:(NSInteger)page pageSize:(NSInteger)pageSize block:(netRequestResultBlock)finishBlock;
#pragma -mark 病害巡查详情
+ (void)getSearchForDiseaseDetailWithID:(NSString *)diseaseId block:(netRequestResultBlock)finishBlock;
#pragma -mark 病害巡查添加
+ (void)addSearchForDiseaseblock:(netRequestResultBlock)finishBlock;
#pragma -mark 接收部门列表
+ (void)receiveDepartmentWithUnitID:(NSString*)unitID  block:(netRequestResultBlock)finishBlock;
#pragma -mark 接收人列表
+ (void)receiveManWithUnitID:(NSString*)unitID  block:(netRequestResultBlock)finishBlock;
#pragma -mark 病害形式列表
+ (void)getDiseaseStyle:(NSString*)style  block:(netRequestResultBlock)finishBlock;
#pragma -mark 病害巡查保存，上报
+ (void)putUpSearchForDisease:(NSString*)diseaseInspectionId routeId:(NSString *)routeId maintainUnitId:(NSString *)maintainUnitId receiveDepartmentId:(NSString *)receiveDepartmentId receiveUser:(NSString *)receiveUser diseaseTypeCode:(NSString *)diseaseTypeCode drivingDirectionCode:(NSString *)drivingDirectionCode startStake:(NSString *)startStake
                     endStake:(NSString *)endStake diseaseFormId:(NSString *)diseaseFormId diseaseLevelCode:(NSString *)diseaseLevelCode diseaseUnitCode:(NSString *)diseaseUnitCode lanePositionCode:(NSString *)lanePositonCode num:(NSString *)num remark:(NSString *)remark weatherCode:(NSString *)weatherCode state:(NSString *)state time:(NSString *)time inspectionUser:(NSString *)inspectionUser block:(netRequestResultBlock)finishBlock;
#pragma -mark 病害维修保存，上报
+ (void)putUpDiseaseMaintain:(NSString*)maintentanceRecordId maintainUnitId:(NSString *)maintainUnitId  maintentanceNoticeNo:(NSString *)maintentanceNoticeNo maintenanceDepartmentId:(NSString *)maintenanceDepartmentId startDate:(NSString *)startDate  endDate:(NSString *)endDate checkUser:(NSString *)checkUser directorUser:(NSString *)directorUser remark:(NSString *)remark weather:(NSString *)weather state:(NSString *)state subProject:(NSString *)subProject measureCode:(NSString *)measureCode maxPrice:(NSString *)maxPrice unit:(NSString *)unit price:(NSString *)price num:(NSString *)num block:(netRequestResultBlock)finishBlock;
#pragma -mark 安全检查保存，上报
+ (void)putUpSafetyCheck:(NSString*)securityCheckId isSignCorrect:(NSString *)isSignCorrect isSaftycoat:(NSString *)isSaftycoat ifSafetyProcess:(NSString *)ifSafetyProcess  isSafetyTraffic:(NSString *)isSafetyTraffic isSafeGuard:(NSString *)isSafeGuard isExistedSafetyman:(NSString *)isExistedSafetyman  otherContent:(NSString *)otherContent dealSuggestion:(NSString *)dealSuggestion content:(NSString *)content checkerUser:(NSString *)checkerUser checkerDate:(NSString *)checkerDate safetyManager:(NSString *)safetyManager signDate:(NSString *)signDate remark:(NSString *)remark routeId:(NSString *)routeId state:(NSString *)state block:(netRequestResultBlock)finishBlock;
#pragma -mark 病害验收保存，上报
+ (void)putUpDiseaseReceive:(NSString*)maintentanceAcceptanceId maintentanceNoticeNo:(NSString *)maintentanceNoticeNo billNo:(NSString *)billNo maintainUnitId:(NSString *)maintainUnitId  maintenanceDepartmentId:(NSString *)maintenanceDepartmentId startDate:(NSString *)startDate endDate:(NSString *)endDate  directorUser:(NSString *)directorUser directorSignDate:(NSString *)directorSignDate state:(NSString *)state accepterUser:(NSString *)accepterUser accepteSignDate:(NSString *)accepteSignDate remark:(NSString *)remark routeId:(NSString *)routeId vcBooleanCode:(NSString *)vcBooleanCode maintentanceMny:(NSString*)maintentanceMny acceptanceProjectMny:(NSString*)acceptanceProjectMny block:(netRequestResultBlock)finishBlock;

#pragma -mark 病害巡查草稿删除
+ (void)getSearchForDiseaseDeleteWithID:(NSString *)diseaseId block:(netRequestResultBlock)finishBlock;
#pragma -mark 维修通知列表
+(void)getMainTainNotificationWithPage:(NSInteger)page pageSize:(NSInteger)pageSize block:(netRequestResultBlock)finishBlock;
#pragma -mark 维修通知详情
+ (void)getMainTainNotificationDetailWithID:(NSString *)diseaseId block:(netRequestResultBlock)finishBlock;
#pragma -mark 验收通知列表
+(void)getAcceptanceNotificationWithPage:(NSInteger)page pageSize:(NSInteger)pageSize block:(netRequestResultBlock)finishBlock;
#pragma -mark 验收通知详情
+ (void)getAcceptanceNotificationDetailWithID:(NSString *)diseaseId block:(netRequestResultBlock)finishBlock;
#pragma -mark 病害维修列表
+(void)getDiseaseMaintainWithPage:(NSInteger)page pageSize:(NSInteger)pageSize block:(netRequestResultBlock)finishBlock;
#pragma -mark 病害维修详情
+ (void)getDiseaseMaintainDetailWithID:(NSString *)diseaseId block:(netRequestResultBlock)finishBlock;
#pragma -mark 病害维修上报和保存
+ (void)getDiseaseMaintainPutUpWithMaintentanceRecordId:(NSString *)maintentanceRecordId routeId:(NSString *)routeId maintainUnitId:(NSString *)maintainUnitId startDate:(NSString *)startDate endDate:(NSString *)endDate maintenanceDepartentId:(NSString *)maintenanceDepartentId remark:(NSString*)remark weatherCode:(NSString *)weatherCode state:(NSString *)state block:(netRequestResultBlock)finishBlock;
#pragma -mark 病害维修安全登记
+ (void)getDiseaseMaintainSafeSignWithID:(NSString *)diseaseId block:(netRequestResultBlock)finishBlock;
#pragma -mark 安全检查列表
+(void)safetyCheckWithPage:(NSInteger)page pageSize:(NSInteger)pageSize block:(netRequestResultBlock)finishBlock;
#pragma -mark 安全检查详情
+ (void)safetyCheckDetailWithID:(NSString *)diseaseId block:(netRequestResultBlock)finishBlock;
#pragma -mark 病害验收列表
+(void)diseaseReceiveWithPage:(NSInteger)page pageSize:(NSInteger)pageSize block:(netRequestResultBlock)finishBlock;
#pragma -mark 病害验收详情
+ (void)diseaseReceiveDetailWithID:(NSString *)diseaseId block:(netRequestResultBlock)finishBlock;
#pragma -mark 安全登记
+ (void)securityRegisterWithMaintentanceRecordId:(NSString *)maintentanceRecordId block:(netRequestResultBlock)finishBlock;
#pragma -mark 生成维修单
+ (void)becomeMaintentanceWithMaintentanceNoticeId:(NSString *)maintentanceNoticeId block:(netRequestResultBlock)finishBlock;
#pragma -mark 重拟验收日期
+ (void)resetWithMaintentanceRecordId:(NSString *)maintentanceRecordId planAcceptanceDate:(NSString *)planAcceptanceDate block:(netRequestResultBlock)finishBlock;
#pragma -mark 启动验收
+ (void)becomeReceiveWithmaintentanceRecordId:(NSString *)maintentanceRecordId block:(netRequestResultBlock)finishBlock;

#pragma -mark 获取桩号
+ (void)getZhuangNumWithLng:(NSString *)lng lat:(NSString *)lat block:(netRequestResultBlock)finishBlock;
#pragma -mark 个人信息
+ (void)getUserInfoblock:(netRequestResultBlock)finishBlock;
#pragma -mark 联系我们
+ (void)getCallMeblock:(netRequestResultBlock)finishBlock;
#pragma -mark 获取工程编码
+ (void)getProjectCodeWithSubProjectTypeCode:(NSString *)subProjectTypeCode block:(netRequestResultBlock)finishBlock;
#pragma -mark 修改密码
+ (void)resetPasswordWithOldUserPwd:(NSString *)oldUserPwd userPwd:(NSString *)userPwd block:(netRequestResultBlock)finishBlock;
#pragma -mark 公告列表
+ (void)getPublicDataWithPage:(NSInteger)page pageSize:(NSInteger)pageSize block:(netRequestResultBlock)finishBlock;
@end
